export const IPC_CHANNELS = {
  tasks: {
    liveControl: {
      connect: 'tasks:liveControl:connect',
      disconnect: 'tasks:liveControl:disconnect',
      disconnectedEvent: 'tasks:liveControl:disconnectedEvent',
    },
    autoMessage: {
      start: 'tasks:autoMessage:start',
      stop: 'tasks:autoMessage:stop',
      stoppedEvent: 'tasks:autoMessage:stoppedEvent',
      updateConfig: 'tasks:autoMessage:updateConfig',
      sendBatchMessages: 'tasks:autoMessage:sendBatchMessages',
    },
    autoPopUp: {
      start: 'tasks:autoPopUp:start',
      stop: 'tasks:autoPopUp:stop',
      updateConfig: 'tasks:autoPopUp:updateConfig',
      stoppedEvent: 'tasks:autoPopUp:stoppedEvent',
      registerShortcuts: 'tasks:autoPopup:registerShortuct',
      unregisterShortcuts: 'tasks:autoPopup:unregisterShortcut',
    },
    aiChat: {
      chat: 'tasks:aiChat:chat',
      stream: 'tasks:aiChat:stream',
      error: 'tasks:aiChat:error',
      normalChat: 'tasks:aiChat:normalChat',
      testApiKey: 'tasks:aiChat:testApiKey',
    },
    autoReply: {
      startCommentListener: 'tasks:autoReply:startCommentListener',
      stopCommentListener: 'tasks:autoReply:stopCommentListener',
      listenerStopped: 'tasks:autoReply:listenerStopped',
      showComment: 'tasks:autoReply:showComment',
      startAutoReply: 'tasks:autoReply:startAutoReply',
      stopAutoReply: 'tasks:autoReply:stopAutoReply',
      replyGenerated: 'tasks:autoReply:replyGenerated',
      sendReply: 'tasks:autoReply:sendReply',
    },
    aiAssist: {
      startBroadcast: 'tasks:aiAssist:startBroadcast',
      stopBroadcast: 'tasks:aiAssist:stopBroadcast',
      broadcastStopped: 'tasks:aiAssist:broadcastStopped',
      synthesizeVoice: 'tasks:aiAssist:synthesizeVoice',
      testVoiceConfig: 'tasks:aiAssist:testVoiceConfig',
      getPresetVoices: 'tasks:aiAssist:getPresetVoices',
      cloneVoice: 'tasks:aiAssist:cloneVoice',
    },
  },
  config: {
    save: 'config:save',
    load: 'config:load',
  },
  chrome: {
    getPath: 'chrome:getPath',
    setPath: 'chrome:setPath',
    selectPath: 'chrome:selectPath',
    toggleDevTools: 'chrome:toggleDevTools',
    saveState: 'chrome:saveState',
  },
  updater: {
    checkUpdate: 'updater:checkUpdate',
    updateAvailable: 'updater:updateAvailable',
    startDownload: 'updater:startDownload',
    downloadProgress: 'updater:downloadProgress',
    updateError: 'updater:updateError',
    updateDownloaded: 'updater:updateDownloaded',
    quitAndInstall: 'updater:quitAndInstall',
  },
  account: {
    switch: 'account:switch',
  },
  log: 'log',
  sendLog: 'sendLog', // 渲染进程向主进程发送日志
  app: {
    openLogFolder: 'app:openLogFolder',
    notifyUpdate: 'app:notifyUpdate',
    openPath: 'app:openPath', // 打开指定路径（文件或文件夹）
  },
  dialog: {
    openFile: 'dialog:openFile',
  },
  video: {
    openFloatingPlayer: 'video:openFloatingPlayer',
    applyAntiDetection: 'video:applyAntiDetection',
    antiDetectionProgress: 'video:antiDetectionProgress',
    saveProcessedVideo: 'video:saveProcessedVideo',
    saveTempFile: 'video:saveTempFile',
  },
  liveWakeup: {
    start: 'liveWakeup:start',
    stop: 'liveWakeup:stop',
    stoppedEvent: 'liveWakeup:stoppedEvent',
    alertTriggered: 'liveWakeup:alertTriggered',
    updateConfig: 'liveWakeup:updateConfig',
    performOCR: 'liveWakeup:performOCR', // 主进程发送截图给渲染进程
    capturePreview: 'liveWakeup:capturePreview', // 手动截图预览
    openFloatingWindow: 'liveWakeup:openFloatingWindow', // 打开悬浮窗
    closeFloatingWindow: 'liveWakeup:closeFloatingWindow', // 关闭悬浮窗
    selectScreenRegion: 'liveWakeup:selectScreenRegion', // 屏幕区域选择
    playAudioFile: 'liveWakeup:playAudioFile', // 播放音频文件
    loadTemplateImage: 'liveWakeup:loadTemplateImage', // 加载模板图片
    performImageMatch: 'liveWakeup:performImageMatch', // 执行图像匹配
  },
  screenRegionSelector: {
    result: 'screen-region-selector:result',
    cancel: 'screen-region-selector:cancel',
  },
  darenJuan: {
    fetchPromotions: 'darenJuan:fetchPromotions', // 获取达人卷推广数据
    fetchCommissionRates: 'darenJuan:fetchCommissionRates', // 获取佣金率数据
  },
  audio: {
    getFileInfo: 'audio:getFileInfo', // 获取音频文件信息
    splitAudio: 'audio:splitAudio', // 分割音频
    splitProgress: 'audio:splitProgress', // 分割进度
  },
} as const
